<!DOCTYPE html>
<html lang="en">
	<head>
		<title> New Document </title>
		<meta charset="utf-8">
		<meta name="Author" content="">
		<meta name="Keywords" content="">
		<meta name="Description" content="">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<!-- Bootstrap -->
		<link href="${webRoot}resources/css/bootstrap.min.css" rel="stylesheet" media="screen">
		<link href="${webRoot}resources/css/style.css" rel="stylesheet">
		<script src="http://code.jquery.com/jquery-1.10.0.min.js"></script>
	</head>
<body class="main">
	<div class="wrap add-shop">
	<ul class="breadcrumb">
		    <li><span id="test">您当前的位置：</span></li>
		    <li class="active">${addAdver}</li>
	    </ul>
		<form class="form-horizontal" method="post"
			action="${webRoot}shop/addAdverInfo.do" id="goodsInfo">
			<input type="hidden" id="shop_id" name="shop_id" value="${shopEntity.id}">
		 <div class="control-group">
		    <label class="control-label" for="shop_id">所属商家</label>
		    <div class="controls">
				  <input type="text" id="shopname"  value="${shopEntity.name}">
		    </div>
		  </div>	
		  <div class="control-group">
		    <label class="control-label" for="title">招聘标题</label>
		    <div class="controls">
		      <input type="text" id="title" name="title">
		    </div>
		  </div>
		  <div class="control-group">
		    <label class="control-label" for="position">职位职能</label>
		    <div class="controls">
		      <input type="text" id="position" name="position">
		    </div>
		  </div>
		  <div class="control-group">
		    <label class="control-label" for="deal">待遇</label>
		    <div class="controls">
		      <input type="text" id="deal" name="deal">
		    </div>
		  </div>
		  <div class="control-group">
		    <label class="control-label" for="issuetime">发布日期</label>
		    <div class="controls">
		      <input type="date" class="w120"  id="issuetime" name="issuetime">
		    </div>
		  </div>
		   <div class="control-group">
		    <label class="control-label" for="activetime">有效期至</label>
		    <div class="controls">
		      <input type="date" class="w120"  id="activetime" name="activetime">
		    </div>
		  </div>
		   <div class="control-group">
		    <label class="control-label" for="telephone">联系电话</label>
		    <div class="controls">
		      <input type="text" id="telephone" name="telephone">
		    </div>
		  </div>
		   <div class="control-group">
		    <label class="control-label" for="posdesc">职位描述</label>
		    <div class="controls">
		      <textarea rows="5" id="posdesc" name="posdesc"></textarea>
		    </div>
		  </div>
		   <div class="control-group">
		    <label class="control-label" for="statrequire">招聘要求</label>
		    <div class="controls">
		      <textarea rows="5" id="statrequire" name="statrequire"></textarea>
		    </div>
		  </div>
		  <div class="control-group">
		    <div class="controls">
		      <button type="button" class="btn" onclick="checkContext()">确认添加</button>
		    </div>
		  </div>
		</form>			 	
	</div>			
	<script src="${webRoot}resources/js/jquery-1.9.1.min.js"></script>
	<script src="${webRoot}resources/js/bootstrap.min.js"></script>
	<script src="${webRoot}resources/js/js.js"></script>
    <script type="text/javascript">
        
        function checkContext(){
        	var goodsName = $("#title").val();
        	if($.trim(goodsName) == null ||$.trim(goodsName) =="" ){
        		alert("招聘标题不能为空！");
        		return;
        	}
        	var goodsJingdu= $("#position").val();
        	if($.trim(goodsJingdu) == null ||$.trim(goodsJingdu) =="" ){
        		alert("职位职能不能为空！");
        		return;
        	}
        	var uplabelId= $("#deal").val();
        	if($.trim(uplabelId) == null ||$.trim(uplabelId) =="" ){
        		alert("待遇不能为空！");
        		return;
        	}
        	var labelId= $("#issuetime").val();
        	if($.trim(labelId) == null ||$.trim(labelId) =="" ){
        		alert("发布日期不能为空！");
        		return;
        	}
        	var goods_Desc= $("#activetime").val();
        	if($.trim(goods_Desc) == null ||$.trim(goods_Desc) =="" ){
        		alert("有效期至不能为空！");
        		return;
        	}
        	var telephone= $("#telephone").val();
        	if($.trim(telephone) == null ||$.trim(telephone) =="" ){
        		alert("联系方式不能为空！");
        		return;
        	}
        	var file= $("#posdesc").val();
        	if($.trim(file) == null ||$.trim(file) =="" ){
        		alert("职位描述不能为空！");
        		return;
        	}
        	var statrequire= $("#statrequire").val();
        	if($.trim(statrequire) == null ||$.trim(statrequire) =="" ){
        		alert("招聘要求不能为空！");
        		return;
        	}
        	document.getElementById("goodsInfo").submit();
        }
    </script>

</body>
</html>
